<div class="content-titulo">
    <h2><?php echo $this->titulo;?></h2>
    <div class="content-btn">
        <a href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit','for_id' => $this->for_id,'id' =>'')); ?>">+</a>
    </div>
</div>

<div class="content-list">
    
<?php foreach ($this->result as $row) { ?>
    <div class="item" style="height:118px">    
        <div class="col" style="width: 200px">
            <p><strong>Código: <?php echo $row->MAT_ID; ?></strong></p>
            <p><strong>Título: </strong><?php echo $row->MAT_NOM; ?></p>
            <p><strong>Status: </strong><?php echo tools::returnStatus($row->MAT_STA); ?></p>
        </div>
        <div class="col" style="width: 200px">
            
        </div>
        
        <div class="col" style="width: 100px">
            
        </div> 
        
         
        
        <div class="btn-actions" style="padding-top: 10px;">
            <?php if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit', 'id' => $row->MAT_ID)); ?>">Editar</a><?php }?>
            <?php if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => 'cor', 'action' => 'index', 'for_id' => $row->FOR_ID, 'mat_id' => $row->MAT_ID)); ?>">Cor</a><?php } ?>
            <?php if($row->MAT_STA == 0){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'delete', 'for_id' => $row->FOR_ID, 'id' => $row->MAT_ID)); ?>">Deletar</a><?php }?>
            <?php /* if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => 'gradecor', 'action' => 'index', 'mat_id' => $row->MAT_ID)); ?>">Grade de Cor</a><?php } */ ?>       
            <?php /* if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => 'gradecorpri', 'action' => 'index', 'mat_id' => $row->MAT_ID)); ?>">Cor Primária</a><?php } */ ?>
            <?php /* if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => 'gradecorsec', 'action' => 'index', 'mat_id' => $row->MAT_ID)); ?>">Cor Secundária</a><?php } */ ?>
        </div>

      </div>
    <?php } ?>
</div>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>

<a href="<?php echo $this->voltar; ?>">Voltar para Fornecedor</a>